Optimal. Leaf size=195 \[ \frac {21 x}{128 a^3}-\frac {i}{128 a d (a-i a \tan (c+d x))^2}+\frac {i a^2}{40 d (a+i a \tan (c+d x))^5}+\frac {3 i a}{64 d (a+i a \tan (c+d x))^4}+\frac {i}{16 d (a+i a \tan (c+d x))^3}+\frac {5 i}{64 a d (a+i a \tan (c+d x))^2}-\frac {3 i}{64 d \left (a^3-i a^3 \tan (c+d x)\right )}+\frac {15 i}{128 d \left (a^3+i a^3 \tan (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 195, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3568, 46, 212}
\begin {gather*} -\frac {3 i}{64 d \left (a^3-i a^3 \tan (c+d x)\right )}+\frac {15 i}{128 d \left (a^3+i a^3 \tan (c+d x)\right )}+\frac {21 x}{128 a^3}+\frac {i a^2}{40 d (a+i a \tan (c+d x))^5}+\frac {3 i a}{64 d (a+i a \tan (c+d x))^4}+\frac {i}{16 d (a+i a \tan (c+d x))^3}-\frac {i}{128 a d (a-i a \tan (c+d x))^2}+\frac {5 i}{64 a d (a+i a \tan (c+d x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 212
Rule 3568
Rubi steps
\begin {align*} \int \frac {\cos ^4(c+d x)}{(a+i a \tan (c+d x))^3} \, dx &=-\frac {\left (i a^5\right ) \text {Subst}\left (\int \frac {1}{(a-x)^3 (a+x)^6} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {\left (i a^5\right ) \text {Subst}\left (\int \left (\frac {1}{64 a^6 (a-x)^3}+\frac {3}{64 a^7 (a-x)^2}+\frac {1}{8 a^3 (a+x)^6}+\frac {3}{16 a^4 (a+x)^5}+\frac {3}{16 a^5 (a+x)^4}+\frac {5}{32 a^6 (a+x)^3}+\frac {15}{128 a^7 (a+x)^2}+\frac {21}{128 a^7 \left (a^2-x^2\right )}\right ) \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {i}{128 a d (a-i a \tan (c+d x))^2}+\frac {i a^2}{40 d (a+i a \tan (c+d x))^5}+\frac {3 i a}{64 d (a+i a \tan (c+d x))^4}+\frac {i}{16 d (a+i a \tan (c+d x))^3}+\frac {5 i}{64 a d (a+i a \tan (c+d x))^2}-\frac {3 i}{64 d \left (a^3-i a^3 \tan (c+d x)\right )}+\frac {15 i}{128 d \left (a^3+i a^3 \tan (c+d x)\right )}-\frac {(21 i) \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,i a \tan (c+d x)\right )}{128 a^2 d}\\ &=\frac {21 x}{128 a^3}-\frac {i}{128 a d (a-i a \tan (c+d x))^2}+\frac {i a^2}{40 d (a+i a \tan (c+d x))^5}+\frac {3 i a}{64 d (a+i a \tan (c+d x))^4}+\frac {i}{16 d (a+i a \tan (c+d x))^3}+\frac {5 i}{64 a d (a+i a \tan (c+d x))^2}-\frac {3 i}{64 d \left (a^3-i a^3 \tan (c+d x)\right )}+\frac {15 i}{128 d \left (a^3+i a^3 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.59, size = 137, normalized size = 0.70 \begin {gather*} \frac {\sec ^3(c+d x) (-1050 \cos (c+d x)+140 i (i+6 d x) \cos (3 (c+d x))+105 \cos (5 (c+d x))+6 \cos (7 (c+d x))-350 i \sin (c+d x)+140 i \sin (3 (c+d x))-840 d x \sin (3 (c+d x))+175 i \sin (5 (c+d x))+14 i \sin (7 (c+d x)))}{5120 a^3 d (-i+\tan (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.27, size = 129, normalized size = 0.66
method | result | size |
derivativedivides | \(\frac {-\frac {21 i \ln \left (\tan \left (d x +c \right )-i\right )}{256}+\frac {3 i}{64 \left (\tan \left (d x +c \right )-i\right )^{4}}-\frac {5 i}{64 \left (\tan \left (d x +c \right )-i\right )^{2}}+\frac {1}{40 \left (\tan \left (d x +c \right )-i\right )^{5}}-\frac {1}{16 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {15}{128 \left (\tan \left (d x +c \right )-i\right )}+\frac {i}{128 \left (\tan \left (d x +c \right )+i\right )^{2}}+\frac {21 i \ln \left (\tan \left (d x +c \right )+i\right )}{256}+\frac {3}{64 \left (\tan \left (d x +c \right )+i\right )}}{d \,a^{3}}\) | \(129\) |
default | \(\frac {-\frac {21 i \ln \left (\tan \left (d x +c \right )-i\right )}{256}+\frac {3 i}{64 \left (\tan \left (d x +c \right )-i\right )^{4}}-\frac {5 i}{64 \left (\tan \left (d x +c \right )-i\right )^{2}}+\frac {1}{40 \left (\tan \left (d x +c \right )-i\right )^{5}}-\frac {1}{16 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {15}{128 \left (\tan \left (d x +c \right )-i\right )}+\frac {i}{128 \left (\tan \left (d x +c \right )+i\right )^{2}}+\frac {21 i \ln \left (\tan \left (d x +c \right )+i\right )}{256}+\frac {3}{64 \left (\tan \left (d x +c \right )+i\right )}}{d \,a^{3}}\) | \(129\) |
risch | \(\frac {21 x}{128 a^{3}}+\frac {7 i {\mathrm e}^{-6 i \left (d x +c \right )}}{256 a^{3} d}+\frac {7 i {\mathrm e}^{-8 i \left (d x +c \right )}}{1024 a^{3} d}+\frac {i {\mathrm e}^{-10 i \left (d x +c \right )}}{1280 a^{3} d}+\frac {17 i \cos \left (4 d x +4 c \right )}{256 a^{3} d}+\frac {9 \sin \left (4 d x +4 c \right )}{128 a^{3} d}+\frac {7 i \cos \left (2 d x +2 c \right )}{64 a^{3} d}+\frac {21 \sin \left (2 d x +2 c \right )}{128 a^{3} d}\) | \(132\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 98, normalized size = 0.50 \begin {gather*} \frac {{\left (840 \, d x e^{\left (10 i \, d x + 10 i \, c\right )} - 10 i \, e^{\left (14 i \, d x + 14 i \, c\right )} - 140 i \, e^{\left (12 i \, d x + 12 i \, c\right )} + 700 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 350 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 140 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 35 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 4 i\right )} e^{\left (-10 i \, d x - 10 i \, c\right )}}{5120 \, a^{3} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.31, size = 292, normalized size = 1.50 \begin {gather*} \begin {cases} \frac {\left (- 11258999068426240 i a^{18} d^{6} e^{34 i c} e^{4 i d x} - 157625986957967360 i a^{18} d^{6} e^{32 i c} e^{2 i d x} + 788129934789836800 i a^{18} d^{6} e^{28 i c} e^{- 2 i d x} + 394064967394918400 i a^{18} d^{6} e^{26 i c} e^{- 4 i d x} + 157625986957967360 i a^{18} d^{6} e^{24 i c} e^{- 6 i d x} + 39406496739491840 i a^{18} d^{6} e^{22 i c} e^{- 8 i d x} + 4503599627370496 i a^{18} d^{6} e^{20 i c} e^{- 10 i d x}\right ) e^{- 30 i c}}{5764607523034234880 a^{21} d^{7}} & \text {for}\: a^{21} d^{7} e^{30 i c} \neq 0 \\x \left (\frac {\left (e^{14 i c} + 7 e^{12 i c} + 21 e^{10 i c} + 35 e^{8 i c} + 35 e^{6 i c} + 21 e^{4 i c} + 7 e^{2 i c} + 1\right ) e^{- 10 i c}}{128 a^{3}} - \frac {21}{128 a^{3}}\right ) & \text {otherwise} \end {cases} + \frac {21 x}{128 a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.74, size = 136, normalized size = 0.70 \begin {gather*} -\frac {-\frac {420 i \, \log \left (\tan \left (d x + c\right ) + i\right )}{a^{3}} + \frac {420 i \, \log \left (\tan \left (d x + c\right ) - i\right )}{a^{3}} + \frac {10 \, {\left (-63 i \, \tan \left (d x + c\right )^{2} + 150 \, \tan \left (d x + c\right ) + 91 i\right )}}{a^{3} {\left (i \, \tan \left (d x + c\right ) - 1\right )}^{2}} - \frac {959 i \, \tan \left (d x + c\right )^{5} + 5395 \, \tan \left (d x + c\right )^{4} - 12390 i \, \tan \left (d x + c\right )^{3} - 14710 \, \tan \left (d x + c\right )^{2} + 9275 i \, \tan \left (d x + c\right ) + 2647}{a^{3} {\left (\tan \left (d x + c\right ) - i\right )}^{5}}}{5120 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.04, size = 173, normalized size = 0.89 \begin {gather*} \frac {21\,x}{128\,a^3}+\frac {\frac {7\,\mathrm {tan}\left (c+d\,x\right )}{640\,a^3}+\frac {11{}\mathrm {i}}{40\,a^3}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,469{}\mathrm {i}}{640\,a^3}-\frac {21\,{\mathrm {tan}\left (c+d\,x\right )}^3}{32\,a^3}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^4\,7{}\mathrm {i}}{32\,a^3}-\frac {63\,{\mathrm {tan}\left (c+d\,x\right )}^5}{128\,a^3}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^6\,21{}\mathrm {i}}{128\,a^3}}{d\,\left (-{\mathrm {tan}\left (c+d\,x\right )}^7\,1{}\mathrm {i}-3\,{\mathrm {tan}\left (c+d\,x\right )}^6+{\mathrm {tan}\left (c+d\,x\right )}^5\,1{}\mathrm {i}-5\,{\mathrm {tan}\left (c+d\,x\right )}^4+{\mathrm {tan}\left (c+d\,x\right )}^3\,5{}\mathrm {i}-{\mathrm {tan}\left (c+d\,x\right )}^2+\mathrm {tan}\left (c+d\,x\right )\,3{}\mathrm {i}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________